package cn.blnp.net.flowable.boot.demo.repository;

import cn.blnp.net.flowable.boot.demo.entity.ActDeModelEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * <h3></h3>
 *
 * @author <a href="mailto:blnp.yibin@qq.com">lyb</a>
 * @version 1.0
 * @since 2025/5/28 17:13
 */
public interface ActDeModelRepository extends JpaRepository<ActDeModelEntity, String> {

    @Query("from ActDeModelEntity as model where model.key = :key and model.modelType = :modelType")
    List<ActDeModelEntity> findModelsByKeyAndType(@Param("key") String key, @Param("modelType") Integer modelType);
}
